package com.otherTest.datastructure.tree.binarysearchtree;


import org.junit.Test;

import java.util.List;

/**
 * @Description:
 * @author: conceit
 * @Date: 2018/11/6  11:21
 */

public class TestBinarySearchTree {

    @Test
    public void test1() {
        BinarySearchTree binarySearchTree = new BinarySearchTree();
        binarySearchTree.insert(50);
        for(int i=0;i<100;i++){
        
            binarySearchTree.insert(i);
        }
        BinarySearchTreeNode custom= binarySearchTree.find(new Integer(5));
        System.out.println(custom.getData());
        this.print(custom);

    }

    public void print(Integer key){
        System.out.println(key);
    }

    public void print(BinarySearchTreeNode node){
        System.out.println(node);
    }

    public void print(List<Integer> integers){
        integers.forEach(System.out::println);
    }
}
